<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>商城后台</title>
        <meta name="keywords"  />
        <meta name="description"  />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/bootstrap/css/bootstrap.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/identify.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/layout.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/account.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/style.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/control_index.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/index.css" />

		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/page.css" />

		<script type="text/javascript" src="/shopping/Public/Admin/Js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="/shopping/Public/layui/layui.js"></script>
		<script type="text/javascript" src="/shopping/Public/Admin/Js/layer/layer.js"></script>
		<script type="text/javascript" src="/shopping/Public/Admin/Js/haidao.offcial.general.js"></script>
		<script type="text/javascript" src="/shopping/Public/Admin/Js/select.js"></script>
		<script type="text/javascript" src="/shopping/Public/Admin/Js/haidao.validate.js"></script>
	</head>

	<body>
		<div class="view-topbar">
			<div class="topbar-console">
				<div class="tobar-head fl">
					<a href="#" class="topbar-logo fl">
					<span><img src="/shopping/Public/Admin/Images/logo.png" width="20" height="20"/></span>
					</a>
					<a href="<?php echo U('Index/index');?>" class="topbar-home-link topbar-btn text-center fl"><span>管理控制台</span></a>
				</div>
			</div>
			<div class="topbar-info">
				<ul class="fr">
					<li class="fl dropdown topbar-notice topbar-btn">
					<a href="#" class="dropdown-toggle">
					<span class="icon-notice"></span>

					<!--have表示有消息，没有消息去掉have-->
					</a>
					</li>
					<li class="fl dropdown topbar-notice topbar-btn">
						<a href="/shopping" class="topbar-btn"><span class="fl text-normal">前台首页</span></a>
					</li>

					<li class="fl topbar-info-item">
					<div class="dropdown">
						<a href="#" class="topbar-btn">
						<span class="fl text-normal"><?php echo (session('admin')); ?></span>
						<span class="icon-arrow-down"></span>
						</a>
						<ul class="dropdown-menu">
							<li><a href="<?php echo U('Login/loginout');?>">退出</a></li>
						</ul>
					</div>
					</li>
				</ul>
			</div>
		</div>
		<div class="view-body">
			<div class="view-sidebar">
				<div class="sidebar-content">
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">用户管理</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;" >
							<li>
								<a href="<?php echo U('User/index');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">用户列表</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('User/admin_index');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">管理员列表</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('User/add');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加用户</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('User/admin_add');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加管理员</span>
								</a>
							</li>
						</ul>
					</div>
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">产品管理</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;">
							<li>
								<a href="<?php echo U('Goods/index');?>">
								<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
								<span class="text-normal">产品列表</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Category/category');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">产品分类</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Category/addTopCategory');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加顶级分类</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Goods/add');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加商品</span>
								</a>
							</li>

						</ul>
					</div>
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">订单管理</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;">
							<li>
								<a href="<?php echo U('Order/index');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">订单管理</span>
								</a>
							</li>
							<li>
								<a href="#">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">评价管理</span>
								</a>
							</li>
						</ul>
					</div>
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">优惠券管理</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;">
							<li>
								<a href="<?php echo U('Coupon/index');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">优惠券列表</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Coupon/add');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加优惠券</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Coupon/give');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">发放优惠券</span>
								</a>
							</li>
						</ul>
					</div>
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">拼团管理</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;">
							<li>
								<a href="<?php echo U('Group/index');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">拼团列表</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Group/index');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">拼团订单</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Group/add');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加拼团</span>
								</a>
							</li>
						</ul>
					</div>
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">秒杀管理</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;">
							<li>
								<a href="<?php echo U('Seckill/index');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">秒杀列表</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Seckill/order');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">秒杀订单</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Seckill/add');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加秒杀</span>
								</a>
							</li>
						</ul>


					</div>
					<!--<div class="sidebar-nav sidebar-nav-fold">-->
						<!--<div class="sidebar-title">-->
							<!--<a href="#">-->
								<!--<span class="icon"><b class="fl icon-arrow-down"></b></span>-->
								<!--<span class="text-normal">专题管理</span>-->
							<!--</a>-->
						<!--</div>-->
						<!--<ul class="sidebar-trans"style="overflow: hidden; display: none;">-->
							<!--<li>-->
								<!--<a href="#">-->
									<!--<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>-->
									<!--<span class="text-normal">专题列表</span>-->
								<!--</a>-->
							<!--</li>-->
							<!--<li>-->
								<!--<a href="#">-->
									<!--<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>-->
									<!--<span class="text-normal">添加专题</span>-->
								<!--</a>-->
							<!--</li>-->
						<!--</ul>-->
					<!--</div>-->
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">商城设置</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;">
							<li>
								<a href="<?php echo U('System/info');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">店铺设置</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('System/pay');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">支付方式设置</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('System/express');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">快递设置</span>
								</a>
							</li>
							<!--<li>-->
								<!--<a href="#">-->
									<!--<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>-->
									<!--<span class="text-normal">功能开启</span>-->
									<!--&lt;!&ndash;5.未支付订单超时设置-->
									<!--设置时间(规定时间内未付款,自动取消订单)-->
									<!--6.领券中心是否开启设置-->
									<!--是/否(未开启不能使用优惠券)-->
									<!--7.首页分类显示个数设置-->
									<!--(首页显示几个分类)&ndash;&gt;-->
								<!--</a>-->
							<!--</li>-->
						</ul>

					</div>
				</div>
			</div>
			
    <div class="view-product">
        <div class="info-center">
            <div class="manage-head">
                <h6 class="padding-left manage-head-con">用户优惠券详情</h6>
            </div>
            <div class="offcial-table input-table table-margin clearfix">
                <?php if($res == null): ?><div class="tr non-info show border-bottom-none">
                        <span>此用户暂时没有优惠券</span>
                    </div>
                    <?php else: ?>
                    <table class="table text-center">
                        <tr>
                            <!--<th class="text-center" style="width: 10px">ID</th>-->
                            <th class="text-center">优惠券名称</th>
                            <th class="text-center">优惠价格</th>
                            <th class="text-center">数量</th>
                            <!--<th class="text-center">已被领取</th>-->
                            <th class="text-center">最低使用金额</th>
                            <!--<th class="text-center">开启优惠券</th>-->
                            <th class="text-center" style="width: 150px;">开始时间</th>
                            <th class="text-center"style="width: 150px;">过期时间</th>
                            <th class="text-center">是否失效</th>
                            <th class="text-center">操作</th>

                        </tr>
                        <?php if(is_array($res)): foreach($res as $k=>$vo): ?><tr>
                                <!--<td><?php echo ($vo["id"]); ?></td>-->
                                <td><?php echo ($vo["name"]); ?></td>
                                <td>¥<?php echo ($vo["cou_pri"]); ?></td>
                                <td><?php echo ($vo["num"]); ?></td>
                                <!--<td><?php echo ($vo["receive_num"]); ?></td>&lt;!&ndash;已被领取数量&ndash;&gt;-->
                                <td>¥<?php echo ($vo["min_pri"]); ?></td>
                                <!--<td><?php echo ($vo['is_open']==0?'不开启':'开启'); ?></td>-->
                                <!--<td>积分总数</td>-->
                                <td><?php echo ($vo["begin_time"]); ?></td>
                                <td><?php echo ($vo["end_time"]); ?></td>
                                <td><?php echo ($vo['is_lose']==1?'未失效':'失效'); ?></td>
                                <td>
                                    <!--<a class="layui-btn  layui-btn-sm" href="<?php echo U('Coupon/edit',array('id'=>$vo['id']));?>">编辑</a>-->
                                    <a class="layui-btn layui-btn-danger layui-btn-sm" href="<?php echo U('Coupon/del',array('id'=>$vo['id']));?>">删除</a>
                                </td>

                            </tr><?php endforeach; endif; ?>
                    </table>
                    <div class="row center-block">
                        <div class="layui-col-md5 layui-col-md-offset5">
                            <?php echo ($page); ?>
                        </div>
                    </div><?php endif; ?>

            </div>
        </div>
        <div class="show-page padding-big-right hidden">
            <div class="page">
            </div>
        </div>
    </div>


		</div>

		<script>
			$(".sidebar-title").live('click', function() {
				if ($(this).parent(".sidebar-nav").hasClass("sidebar-nav-fold")) {
					$(this).next().slideDown(200);
					$(this).parent(".sidebar-nav").removeClass("sidebar-nav-fold");
				} else {
					$(this).next().slideUp(200);
					$(this).parent(".sidebar-nav").addClass("sidebar-nav-fold");
				}
			});
		</script>
	</body>

</html>